package com.md.service;

import com.md.entity.DeptInfo;
import com.md.mapper.DeptMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptMapper deptMapper;

    @Override
    public List<DeptInfo> selectAll() {
        return deptMapper.selectAll();
    }

    @Override
    public DeptInfo selectById(int did) {
        return deptMapper.selectById(did);
    }

    @Override
    public int deleteById(int did) {
        return deptMapper.deleteById(did);
    }

    @Override
    public int inserts(DeptInfo deptInfo) {
        return deptMapper.inserts(deptInfo);
    }

    @Override
    public int updates(DeptInfo deptInfo) {
        return deptMapper.updates(deptInfo);
    }

    @Override
    public List<DeptInfo> selectByName(String dname) {
        return deptMapper.selectByName(dname);
    }
}
